package com.healthcloud.entity.RegionalDisease;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Map;

/**
 * Created by yucl on 2017/11/17.
 */
    public class SlowDiseaseStatisticsEntity implements Serializable{

    /**
     * XX测试人数
     */
    private String personTitle;
//    /**
//     * 测试
//     */
//    private String personTotalTitle;
//    /**
//     * 偏高
//     */
//    private String personUpperTitle;
//    /**
//     * 偏低
//     */
//    private String personLowerTitle;
    /**
     * 测试数值
     */
    private String personTotal;

    /**
     * 偏高数值
     */
    private String personUpper;

    /**
     * 偏低数值
     */
    private String personLower;

    /**
     * XXX测试次数
     */
    private String testTitle;
//    private String testTotalTitle;
//    private String testUpperTitle;
//    private String testLowerTitle;
    private String testTotal;
    private String testUpper;
    private String testUpperPercent;
    private String testLower;
    private String testLowerPercent;


    /**
     * 异常XX男女比例
     */
    private String percentTitle;
    /**
     * 男性比例
     */
    private String manPercent;

    /**
     * 男性人数
     */
    private Integer manCount;
    /**
     *女性比例
     */
    private String womanPercent;

    /**
     * 女性人数
     */
    private Integer womanCount;

    /**
     * 异常XX年龄段分布
     */
    private String ageDistributionTitle;

    /**
     *  key:0-20岁
     *  value:10%
     */
    private Map<String,String > ageDistribution;


    public String getPersonTitle() {
        return personTitle;
    }

    public void setPersonTitle(String personTitle) {
        this.personTitle = personTitle;
    }

//    public String getPersonTotalTitle() {
//        return personTotalTitle;
//    }
//
//    public void setPersonTotalTitle(String personTotalTitle) {
//        this.personTotalTitle = personTotalTitle;
//    }
//
//    public String getPersonUpperTitle() {
//        return personUpperTitle;
//    }
//
//    public void setPersonUpperTitle(String personUpperTitle) {
//        this.personUpperTitle = personUpperTitle;
//    }
//
//    public String getPersonLowerTitle() {
//        return personLowerTitle;
//    }
//
//    public void setPersonLowerTitle(String personLowerTitle) {
//        this.personLowerTitle = personLowerTitle;
//    }

    public String getPersonTotal() {
        return personTotal;
    }

    public void setPersonTotal(String personTotal) {
        this.personTotal = personTotal;
    }

    public String getPersonUpper() {
        return personUpper;
    }

    public void setPersonUpper(String personUpper) {
        this.personUpper = personUpper;
    }

    public String getPersonLower() {
        return personLower;
    }

    public void setPersonLower(String personLower) {
        this.personLower = personLower;
    }

    public String getTestTitle() {
        return testTitle;
    }

    public void setTestTitle(String testTitle) {
        this.testTitle = testTitle;
    }

//    public String getTestTotalTitle() {
//        return testTotalTitle;
//    }
//
//    public void setTestTotalTitle(String testTotalTitle) {
//        this.testTotalTitle = testTotalTitle;
//    }
//
//    public String getTestUpperTitle() {
//        return testUpperTitle;
//    }
//
//    public void setTestUpperTitle(String testUpperTitle) {
//        this.testUpperTitle = testUpperTitle;
//    }
//
//    public String getTestLowerTitle() {
//        return testLowerTitle;
//    }
//
//    public void setTestLowerTitle(String testLowerTitle) {
//        this.testLowerTitle = testLowerTitle;
//    }

    public String getTestTotal() {
        return testTotal;
    }

    public void setTestTotal(String testTotal) {
        this.testTotal = testTotal;
    }

    public String getTestUpper() {
        return testUpper;
    }

    public void setTestUpper(String testUpper) {
        this.testUpper = testUpper;
    }

    public String getTestLower() {
        return testLower;
    }

    public void setTestLower(String testLower) {
        this.testLower = testLower;
    }

    public String getPercentTitle() {
        return percentTitle;
    }

    public void setPercentTitle(String percentTitle) {
        this.percentTitle = percentTitle;
    }

    public String getManPercent() {
        return manPercent;
    }

    public void setManPercent(String manPercent) {
        this.manPercent = manPercent;
    }

    public String getWomanPercent() {
        return womanPercent;
    }

    public void setWomanPercent(String womanPercent) {
        this.womanPercent = womanPercent;
    }

    public Map<String, String> getAgeDistribution() {
        return ageDistribution;
    }

    public void setAgeDistribution(Map<String, String> ageDistribution) {
        this.ageDistribution = ageDistribution;
    }

    public String getAgeDistributionTitle() {
        return ageDistributionTitle;
    }

    public void setAgeDistributionTitle(String ageDistributionTitle) {
        this.ageDistributionTitle = ageDistributionTitle;
    }


    public Integer getManCount() {
        return manCount;
    }

    public void setManCount(Integer manCount) {
        this.manCount = manCount;
    }

    public Integer getWomanCount() {
        return womanCount;
    }

    public void setWomanCount(Integer womanCount) {
        this.womanCount = womanCount;
    }

    public String getTestUpperPercent() {

        if("0".equals(testTotal)){
            return "0%";
        }
        return  new BigDecimal(Float.valueOf(testUpper) / Float.valueOf(testTotal) * 100).setScale(0, BigDecimal.ROUND_HALF_UP) + "%";
    }

    public void setTestUpperPercent(String testUpperPercent) {
        this.testUpperPercent = testUpperPercent;
    }

    public String getTestLowerPercent() {

        if("0".equals(testTotal)){
            return "0%";
        }
        return  new BigDecimal(Float.valueOf(testLower) / Float.valueOf(testTotal) * 100).setScale(0, BigDecimal.ROUND_HALF_UP) + "%";
    }

    public void setTestLowerPercent(String testLowerPercent) {
        this.testLowerPercent = testLowerPercent;
    }
}
